package eureka.domain.account;

import java.io.Serializable;
import java.sql.Timestamp;

import util.lang.StringHelper;

/**
 * 
 * @author jinyi
 *
 */
public class EmailVerification implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private long evID;
	private long uID;
	private String EmailAddr;
	private String Token;
	private Timestamp DeliverDate;
	private Timestamp ExpireDate;
	
	public long getEvID() {
		return evID;
	}
	public void setEvID(long evID) {
		this.evID = evID;
	}
	
	public long getUID() {
		return uID;
	}
	public void setUID(long uID) {
		this.uID = uID;
	}
	
	public String getMaskedEmailAddr() {
		return StringHelper.getMaskedEmailAddr(EmailAddr);
	}
	public String getEmailAddr() {
		return EmailAddr;
	}
	public void setEmailAddr(String EmailAddr) {
		this.EmailAddr = EmailAddr;
	}
	
	public String getToken() {
		return Token;
	}
	public void setToken(String Token) {
		this.Token = Token;
	}

	public Timestamp getDeliverDate() {
		return DeliverDate;
	}
	public void setDeliverDate(Timestamp DeliverDate) {
		this.DeliverDate = DeliverDate;
	}
	
	public Timestamp getExpireDate() {
		return ExpireDate;
	}
	public void setExpireDate(Timestamp ExpireDate) {
		this.ExpireDate = ExpireDate;
	}
	
	public EmailVerification() {
		super();
	}
	
	public static EmailVerification getDefaultEmpty() {
		EmailVerification ev = new EmailVerification();
		ev.evID = 0;
		ev.uID = 0;
		ev.EmailAddr = "";
		ev.Token = "";
		ev.DeliverDate = null;
		ev.ExpireDate = null;
		return ev;
	}
    @Override
    public String toString() {
    	return getMaskedEmailAddr();
    }
}
